package com.lcf.system.feign;

import com.lcf.feign.service.system.SysFileFeignService;
import com.lcf.framework.utils.oss.OssUtils;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 文件
 *
 * @author lcf
 */
@Hidden
@RestController
@RequestMapping("feign/file")
public class SysFileFeignServiceImpl implements SysFileFeignService {

    @Override
    @GetMapping("absoluteUrl")
    public String getAbsoluteUrl(String filePath) {
        return OssUtils.getAbsoluteUrl(filePath);
    }

    @Override
    @PostMapping("absoluteUrlMap")
    public Map<String, String> getAbsoluteUrlMap(List<String> filePath) {
        return OssUtils.getAbsoluteUrlMap(filePath);
    }
}
